/**
 * @author LKQ
 * @date 2022/2/28 11:32
 * @description
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int sumOfLeftLeaves(TreeNode root) {
        if (root == null) {
            return 0;
        }
        int sum = 0;
        if (root.left != null && root.left.left == null && root.left.right == null) {
            sum += root.left.val;
        }
        return sum + sumOfLeftLeaves(root.left) + sumOfLeftLeaves(root.right);
    }
}
